home *** CD-ROM | disk | FTP | other *** search
- class classes.fx.FireBallTrail
- {
- var x;
- var y;
- var id;
- var clip;
- var cMax;
- var xMov = 0;
- var yMov = 0;
- var c = 0;
- var Name = "fireBallTrail";
- function FireBallTrail(px, py, pid)
- {
- this.x = px;
- this.y = py;
- this.id = pid;
- _root.d = _root.d + 1;
- this.clip = _root.attachMovie("fireBallTrail","fireBallTrail" + this.id + "Clip",_root.d);
- this.clip._x = this.x;
- this.clip._y = this.y;
- this.clip.gotoAndStop("shape" + _root.randRange(1,6));
- if(random(2) > 0)
- {
- this.xMov = _root.randRange(-2,2);
- }
- else
- {
- this.yMov = _root.randRange(-2,2);
- }
- this.cMax = _root.randRange(8,20);
- }
- function main()
- {
- this.c = this.c + 1;
- if(this.c >= this.cMax)
- {
- _root.removeFX("fireBallTrail" + this.id);
- }
- this.clip._alpha = 100 - this.c * (100 / this.cMax) + (random(50) - 25);
- this.x += this.xMov;
- this.y += this.yMov;
- this.clip._x = this.x;
- this.clip._y = this.y;
- }
- }
-